#ifndef _RANKINGVIEW_H_
#define _RANKINGVIEW_H_
#include "cocos2d.h"
#include "cocos/ui/CocosGUI.h"
class RankingItem : public cocos2d::ui::Layout
{
	//cocos2d::ui::ImageView*			m_rankingbg;
	cocos2d::ui::Text*				m_txtRankingID;
	cocos2d::ui::Text*				m_txtNickName;
	cocos2d::ui::Text*				m_txtPlayerID;
	cocos2d::ui::Text*				m_txtMoney;
	
public:
	RankingItem();
	~RankingItem();
	virtual bool init(int rankingID);
	static RankingItem *create(int rankingID);
	void updateView(void* pRankingView);
};


class RankingView : public cocos2d::Layer
{
public:
	enum titleBtn
	{		
		WIN_BTN,
		RECHARGE_BTN,
	};
	cocos2d::ui::Widget*	         UI;
	cocos2d::ui::Widget*	         m_bg;

	cocos2d::ui::ListView*			 m_ListView;
	cocos2d::ui::ListView*          n_ListView;
	cocos2d::ui::Button*             ranking_close;
	cocos2d::ui::ImageView*			 m_imgRankingBg;
	cocos2d::ui::Button*             winBtn;
	cocos2d::ui::Button*             rechargeBtn;
	std::int8_t curState;
public:
	static RankingView* create();
	RankingView(void);
	~RankingView(void);
	virtual bool init();
	void loadRankingView(cocos2d::Ref* sender, cocos2d::ui::SEL_TouchEvent selector);
	void updateRankingView(int tag = titleBtn::WIN_BTN);
	void SetBtnCallBack(cocos2d::Ref* target, cocos2d::ui::SEL_TouchEvent selector);
	void setTitleBtnCallBack(cocos2d::Ref* target, cocos2d::ui::TouchEventType type);
};
#endif // !_RANKINGVIEW_H_
